package com.talent.web.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.talent.web.model.TalentResult;
import com.talent.web.model.entity.SysLog;
import com.talent.web.service.ISysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName：SysLogController
 * @Author: hszhou
 * @Date: 2024/10/26 10:54
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
@RestController
@RequestMapping("/log")
public class SysLogController {


    @Autowired
    private ISysLogService logService;
    @GetMapping("page")

    public TalentResult<IPage<SysLog>> page(@RequestParam(defaultValue = "1") int current,
                                            @RequestParam(defaultValue = "10") int pageSize){

        IPage<SysLog> pageN = logService.page(current, pageSize);
        return TalentResult.success(pageN);
    }
}
